# -*- coding: UTF-8 -*-
#!/usr/bin/env python

from jd import trackprod
from pymongo.mongo_client import MongoClient

def track():
    list = ['1792760','1792767','2776865']
    map(trackprod,list)
    print 'track down~'

def trackdb():
    list = MongoClient().contact.trackproduct.find({})
    if list:
        for pd in list:
            trackprod(pd['prodid'])
    print 'track down~'